#include <stdio.h>
#include <string.h>

int main()
{
    FILE* fl = fopen("./2.txt", "r");
    char buf[1024] = {0};
    int size = fread(buf, 1, sizeof(buf)-1, fl);
    printf("output 2.txt: %s\n", buf);
    fclose(fl);
    return 0;
}
#if 0
int main(){
    FILE* fl = fopen("./1.txt", "w+");
    if(fl == NULL){
        perror("fopen");
        return 0;
    }

    char* arr = "hello 1.txt";
    int size = fwrite(arr, 1, strlen(arr), fl);
    fclose(fl);
    printf("write in file:  %d\n", size);
    return 0;
}
#endif
